From: Christian Limpach Date: Thu, 4 Jan 2007 15:50:08 +0000 (+0000) Subject: [linux] Fix vsnprintf patch not to write null byte past the end of the buffer. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~89 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=a9aa1a0d2904e322276d5c3cefdef465128f5516;p=xen.git [linux] Fix vsnprintf patch not to write null byte past the end of the buffer. Signed-off-by: Christian Limpach --- diff --git a/patches/linux-2.6.16.33/vsnprintf.patch b/patches/linux-2.6.16.33/vsnprintf.patch index 69a93fa5c5..3e32773986 100644 --- a/patches/linux-2.6.16.33/vsnprintf.patch +++ b/patches/linux-2.6.16.33/vsnprintf.patch @@ -203,7 +203,7 @@ index b07db5c..f595947 100644 + if (str < end) + *str = '\0'; + else -+ *end = '\0'; ++ end[-1] = '\0'; + } + /* the trailing null byte doesn't count towards the total */ return str-buf;